pylamma is a library that allows to get and manipulate meteorological data of Tuscany acquired from files generated by the regional laboratory of monitoring and modeling ambient LAMMA.
Example: look at main.py

CONSTRUCTOR:

The constructor doesn't get parameters. 
example: 
meteo = pyLamma.pyLamma()

COSTANT:

DAY="giorno"
	    Weekday
MORNING="mattina"
   Time slot: morning
AFTERNOON="pomeriggio"
	Time slot: afternoon
EVENING="sera"
	Time slot: evening
NIGHT="notte"

	Time slot: night
TEMP_MIN="min"
	Minimum temperature
TEMP_MAX="max"
	Maximum temperature
TEMP_REAL=""
	Real temperature
TEMP_PERC="perc"

	Perceived temperature
HYDRO_RISK="idraulico"
	Hydraulic risk
GEO_HYDRO_RISK="idrogeologico"
	 Hydrogeological risk
THUNDERSTORM_RISK="temporali"
	 Storms risk
WIND_RISK="vento"
	Wind risk
SNOW_RISK="neve"
	Snowfall warning
ICE_RISK="ghiaccio"     Ice risk



FUNCTION: _dataURL()

Parameters:
No one

Description:
Returns the URL from which data are extracted.

Return:
URL (string)

FUNCTION: getCityList()

Parameters:
No one

Description:
Returns the list of available areas.

Return:
Array

FUNCTION: selectCity(city)

Parameters:
Nome citt (stringa)

Description:
Select the city from which you want to get meteorological informations.

Return in case of success:
xml.dom.minidom.Document object 

Return in case of failure:
False

FUNCTION: name(city)

Parameters:
City name (string)

Description:
Returns the name of the selected city.

Return in case of success:
City name (string).

Return in case of failure:
False


FUNCTION: lastUpdate(city)

Parameters:
City name (string)

Description:
Returns date and time of the last data update.

Return in case of success:
Date and time (string).

Return in case of failure:
None

FUNCTION: sunrise(city)

Parameters:
City name (string)

Description:
Returns sunrise hour of the selected city.

Return in case of success:
Ora alba (stringa)

Return in case of failure:
None

FUNCTION: sunset(city)

Parameters:
City name (string)

Description:
Returns sunset hour of the selected city.

Return in case of success:
Sunset hour (string)

Return in case of failure:
None

FUNCTION: sun_height(city)

Parameters:
City name (string)

Description:
Returns solar height hour.

Return in case of success:
Solar height hour (string)

Return in case of success:
None

FUNCTION: max_sun_hour(city)

Parameters:
City name (string)

Description:
Returns the maximum solar height hour.

Return in case of success:
Maximum solar height hour (string)

Return in case of failure:
None

FUNCTION: moon_rises(city)

Parameters:
City name (string)

Description:
Returns moon rises hour.

Return in case of success:
Moon rises hour (string)

Return in case of failure:
None

FUNCTION: moon_sets(city)

Parameters:
City name (string)

Description:
Return moon sets hour.

Return in case of success:
Moon sets hour (string)

Return in case of failure:
None

FUNCTION: getPrevisions(city)

Parameters:
City name (string)

Description:
Returns the city selected forecast.

Return in case of success:
Array

Return in case of failure:
False

FUNCTION: getDayByIdday(idday,prevs)

Parameters:
idday: integer (1-5)
prevs: Array

Description:
Returns the weather condition of the day passed as parameter.

Return in case of success:
Weather condition (string)

Return in case of failure:
False

FUNCTION: getWeather(idday,time,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
prevs: Array

Description:
Returns the weather condition of the selected time slot.

Return in case of success:
Weather condition (string).

Return in case of failure:
False


FUNCTION: getWeatherStat_wind(idday,time,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
prevs: Array

Description:
Returns the wind meteorological condition of selected time slot.

Return in case of success:
Wind meteorological condition (string).

Return in case of failure:
None


FUNCTION: getWeatherStat_temps(idday,time,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
prevs: Array

Description:
Returns temperature course of selected time slot.

Return in case of success:
Temperature course (string).

Return in case of failure:
None


FUNCTION: getUV(idday,time,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
prevs: Array

Description:
Returns UV radiation of the selected time slot.

Return in case of success:
UV (string).

Return in case of failure:
None


FUNCTION: getTemps(idday,time,temp_type,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
temp_type: (pyLamma.TEMP_MIN/ pyLamma.TEMP_MAX/pyLamma.TEMP_REAL/pyLamma.TEMP_PERC)
prevs: Array

Description:
Returns temperature of the selected time slot.

Return in case of success:
Temperature (string).

Return in case of failure:
None

Warning (data scheme false):
String

FUNCTION: getInversion(idday,time,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
prevs: Array

Description:
Returns the climatic inversion of the selected time slot.

Return in case of success:
Climatic inversion (string).

Return in case of failure:
None


FUNCTION: getHumidity(idday,time,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
prevs: Array

Description:
Returns the percentage of humidity of the selected time slot.

Return in case of success:
Humidity (string).

Return in case of failure:
None


FUNCTION: getRainProbability(idday,time,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
prevs: Array

Description:
Returns the precipitation probability of the selected time slot.

Return in case of success:
Precipitation probability (string).

Return in case of failure:
None


FUNCTION: getSnowLevel(idday,time,prevs)

Parameters:
idday: integer (1-5)
time: string (pyLamma.DAY/pyLamma.MORNING/pyLamma.AFTERNOON/pyLamma.EVENING/pyLamma.NIGHT)
prevs: Array

Description:
Returns snow altitude of the selected time slot.

Return in case of success:
Snow altitude (stringa).

Return in case of failure:
None


FUNCTION: getAlert(idday,prevs)

Parameters:
idday: integer (1-5)
prevs: Array

Description:
Returns the alert degree of the selected day.

Return in case of success:
Alert degree (string).

Return in case of failure:
None


FUNCTION: getRisk(idday,risk_type,prevs)

Parameters:
idday: integer (1-5)
risk_type: string (pyLamma.HYDRO_RISK/pyLamma.GEO_HYDRO_RISK/pyLamma.THUNDERSTORM_RISK/pyLamma.WIND_RISK/pyLamma.SNOW_RISK/pyLamma.ICE_RISK)
prevs: Array

Description:
Returns the risk degree of the selected type.

Return in case of success:
Risk degree (string).

Return in case of failure:
None

FUNCTION: version()

Parameters:
No one

Description:
Returns the current version of pyLamma

Return:
pyLamma version (string)


License:

pyLamma   Tuscany meteo python library
    Copyright (C) 2019  Federico Salotti
    

This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <https://www.gnu.org/licenses/>.

 

company/organization: MR_ROBOT_COMPUTERS_REPAIR
 Country: Italy
  City: Barga (LU)
  website: mrrobotcomputers.hopto.org
  mail address: mrrobotcomputersrepair@gmail.com
